#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.basic.module.role.service;

import ${package}.common.bean.po.Role;
import ${package}.common.bean.vo.DistributionRole;
import ${package}.common.bean.vo.QueryBean;
import ${package}.common.bean.vo.SubPermission;
import ${package}.common.bean.vo.UserPermissionVo;
import com.github.pagehelper.PageInfo;

import java.util.List;

/**
 * Description: 无法补充
 *
 * @author wupanhua
 * @date 2019/8/6 15:28
 *
 * <pre>
 *              ${copyright}
 *      Copyright (c) 2019. All Rights Reserved.
 * </pre>
 */
public interface RoleService {

    /**
     * Description:
     * <根据用户主键找到角色>
     * @author wupanhua
     * @date 11:01 2019/8/7
     * @param id 1
     * @return java.util.List<Role>
     **/
    List<Role> findRolesByUserKey(Long id);

    /**
     * Description:
     * <获取用户的所有权限>
     * @author 周婷婷
     * @date 11:01 2019/8/7
     * @return java.util.List<UserPermissionVo>
     **/
    List<UserPermissionVo> getPermissionByUserId();

    /**
     * Description:
     * <根据用户主不在的角色>
     * @author wupanhua
     * @date 11:01 2019/8/7
     * @param id 1
     * @return java.util.List<Role>
     **/
    List<Role> findNotInRolesByUserKey(Long id);

    /**
     * Description:
     * <获取所有角色>
     * @author wupanhua
     * @date 11:01 2019/8/7
     * @return java.util.List<Role>
     **/
    List<Role> findAllRoles();

    /**
     * Description:
     * <下发角色>
     * @author wupanhua
     * @date 11:02 2019/8/7
     * @param distributionRole 1
     **/
    void distributionRole(DistributionRole distributionRole);

    /**
     * Description:
     * <获取角色列表>
     * @author wupanhua
     * @date 11:02 2019/8/7
     * @param queryBean 1
     * @return com.github.pagehelper.PageInfo<Role>
     **/
    PageInfo<Role> findRoleListLimit(QueryBean queryBean);

    /**
     * Description:
     * <新增角色>
     * @author wupanhua
     * @date 11:03 2019/8/7
     * @param role 1
     **/
    void addRole(Role role);

    /**
     * Description:
     * <根据角色主键删除角色>
     * @author wupanhua
     * @date 11:03 2019/8/7
     * @param id 1
     **/
    void deleteRoleByRoleKey(Long id);

    /**
     * Description:
     * <对角色下发权限>
     * @author wupanhua
     * @date 11:03 2019/8/7
     * @param subPermission 1
     **/
    void distributionPermission(SubPermission subPermission);

    /**
     * Description:
     * <禁用/启用角色>
     * @author pig
     * @date 11:04 2019/8/7
     * @param role 1
     **/
    void disableOrEnableRole(Role role);

    /**
     * Description:
     * <根据id查询角色信息>
     * @author pig
     * @date 11:04 2019/8/7
     * @param id 1
     * @return Role
     **/
    Role queryRoleById(Long id);

    /**
     * Description:
     * <根据id更新角色信息>
     * @author pig
     * @date 11:05 2019/8/7
     * @param role 1
     **/
    void updateRoleById(Role role);

    /**
     * Description:
     * <批量删除角色>
     * @author pig
     * @date 11:05 2019/8/7
     * @param keys 1
     * @return java.util.List<Role>
     **/
    List<Role> removeRolesBykeys(List<Long> keys);

    /**
     * Description:
     * <查询是否重复名称>
     * @author pig
     * @date 11:05 2019/8/7
     * @param name 1
     * @param id 2
     * @return java.lang.Boolean
     **/
    Boolean roleVerifyName(String name, Long id);

    /**
     * Description:
     * <查询编码是否重复>
     * @author pig
     * @date 11:06 2019/8/7
     * @param code 1
     * @return java.lang.Boolean
     **/
    Boolean roleVerifyCode(String code);

    /**
     * Description:
     * <查询全部角色名称>
     * @author yangliu
     * @date 11:06 2019/8/7
     * @return java.util.List<java.lang.String>
     **/
    List<String> queryAllRoleName();
}
